package cola.rh.System.Service;

import cola.rh.System.Entity.Role;
import cola.rh.System.Entity.vo.AssginRoleVo;
import cola.rh.System.Entity.vo.RoleQueryVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Map;

/**
 * @Name: RoleService
 * @Author: Cola
 * @Time: 2023/3/8 15:34
 * @Description: RoleService
 */
public interface RoleService extends IService<Role> {

    /**
     * 条件分页查询
     *
     * @param page        当前页
     * @param limit       每页显示的页数
     * @param roleQueryVo roleQueryVo
     * @return pageModel
     */
    IPage<Role> pageQueryUser(Long page, Long limit, RoleQueryVo roleQueryVo);

    /**
     * 根据 用户 ID 获取角色数据
     *
     * @param userId userId
     * @return map
     */
    Map<String, Object> findRoleByUserId(Long userId);

    /**
     * 分配角色
     *
     * @param assginRoleVo assginRoleVo
     */
    void doAssign(AssginRoleVo assginRoleVo);
}
